package com.zycfc.zsf.boot.office.excel.bean;

import java.io.*;
import java.util.*;

public class ExcelImportResponse implements Serializable
{
    private static final long serialVersionUID = 1L;
    private static final int SUCCESS = 0;
    private static final int ERROR = -1;
    private int retCode;
    private String retMsg;
    List<LinkedHashMap<String, Object>> dateList;
    List<Object> errorList;
    private Exception exception;
    
    public ExcelImportResponse() {
        this.setRetCode(0);
    }
    
    public ExcelImportResponse(final List<LinkedHashMap<String, Object>> dateList) {
        this.setDateList(dateList);
        this.setRetCode(0);
    }
    
    public ExcelImportResponse(final int retCode, final String retMsg, final List<LinkedHashMap<String, Object>> dateList) {
        this.setRetCode(retCode);
        this.setRetMsg(retMsg);
        this.setDateList(dateList);
    }
    
    public ExcelImportResponse(final List<LinkedHashMap<String, Object>> dateList, final List<Object> errorList) {
        this.setDateList(dateList);
        this.setErrorList(errorList);
        this.setRetCode(-1);
    }
    
    public ExcelImportResponse(final int retCode, final String retMsg, final List<LinkedHashMap<String, Object>> dateList, final List<Object> errorList) {
        this.setRetCode(retCode);
        this.setRetMsg(retMsg);
        this.setDateList(dateList);
        this.setErrorList(errorList);
    }
    
    public ExcelImportResponse(final String retMsg) {
        this.setRetCode(-1);
        this.setRetMsg(retMsg);
    }
    
    public ExcelImportResponse(final Exception e) {
        this.setRetCode(-1);
        this.setRetMsg(e.getMessage());
        this.setException(e);
    }
    
    public int getRetCode() {
        return this.retCode;
    }
    
    public void setRetCode(final int retCode) {
        this.retCode = retCode;
    }
    
    public String getRetMsg() {
        return this.retMsg;
    }
    
    public void setRetMsg(final String retMsg) {
        this.retMsg = retMsg;
    }
    
    public List<LinkedHashMap<String, Object>> getDateList() {
        return this.dateList;
    }
    
    public void setDateList(final List<LinkedHashMap<String, Object>> dateList) {
        this.dateList = dateList;
    }
    
    public Exception getException() {
        return this.exception;
    }
    
    public void setException(final Exception exception) {
        this.exception = exception;
    }
    
    public List<Object> getErrorList() {
        return this.errorList;
    }
    
    public void setErrorList(final List<Object> errorList) {
        this.errorList = errorList;
    }
}
